<?php
$name = system_controller_front::getInstance()->getRequest()->getActionName();
$_type = system_controller_front::getInstance()->getRequest()->getQuery('type');
?>
<div class="body tabs">
	<form action="<?php echo $this->url('resource/file/list');?>" method="get">
	<?php echo $this->form()->hidden('order', $this->order);?>
	<?php echo $this->form()->hidden('sort', $this->sort);?>
	<ul class="list">
		<li<?php if($name=='list' && !$_type) echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('resource/file/list');?>">
				<?php echo $this->language('ALL Files');?><?php if($name=='list' && $_type) echo ' »'; ?>
			</a>
		</li>
		<?php foreach(new resource_file_type() AS $type) { ?>
		<li<?php if($name=='list' && $_type && strtoupper($_type) == $type->getKey()) echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('resource/file/list', array(), array('type' => ucfirst(strtolower($type->getKey()))));?>">
				<?php echo $type->getName();?><?php if($name=='list' && $_type && strtoupper($_type) == $type->getKey()) echo ' »'; ?>
			</a>
		</li>
		<?php }?>
		<li class="rs">
			<span><?php echo $this->render('include/searchInput.phtml');?></span>
			<span><button type="submit" value="Search" class="small">Search</button></span>
		</li>
	</ul>
	<div class="clearfix"></div>
	</form>
</div>
